-module(obj_conv).
-export([do/4]).
-include("management.hrl").

do(ehtml,table,Items,Id) when is_list(Items) ->
	{
	table,[{"id",Id}],
		lists:map(fun(Item) ->
					do(ehtml,table_item,Item,"item")
				  end
				  ,Items)
	};
do(ehtml,table_item,Item,Id) when is_record(Item,server_rec) ->
	{tr,[],[
		{td,[],Item#server_rec.title},
		{td,[],Item#server_rec.type}
	]};
do(ehtml,_,_,_) ->
	undefined.